import { createApp } from "vue";
import App from "./App.vue";

const app = createApp(App);
//ElementPlus
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

//国际化
import i18n from '@/i18n';
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
//语言环境
import locale from "element-plus/lib/locale/lang/zh-cn";

import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

import "@/style/global.scss"

//组件库
import framework from "@/lib/CisFramework.js";
//组件库css
import "@/lib/style.css";
//低代码库
// @ts-ignore
import CisLowCodeFramework from "@/lowCodeLib/CisLowCodeFramework.js";
//低代码库样式
import "@/lowCodeLib/style.css";
import CisJsonViewer from "@/lib/CisJsonViewer/CisJsonViewer";
import "@/lib/CisJsonViewer/style.css";
//低代码库样式
import "@/lowCodeLib/style.css";
//全局状态
import { createPinia } from "pinia";
import http from "@/packages/utils/http";
//自动全局注册组件
import install from "./components/install";

//路由
import router from "./router";
//WINDICSS
import "virtual:windi.css";
import "highlight.js/styles/atom-one-dark.css";
import "highlight.js/lib/common";
import hljsVuePlugin from "@highlightjs/vue-plugin";
//iconfont
import '@/assets/lc/iconfont/iconfont'
import '@/assets/lc/iconfont/iconfont.css'


// @ts-ignore
app
  .use(ElementPlus, { size: "default", locale })
  .use(install)
  .use(i18n)
  .use(CisJsonViewer)
  .use(router as any)
  .use(framework, { http })
  .use(CisLowCodeFramework)
  .use(createPinia())
  .use(hljsVuePlugin)
  .use(VXETable)
  .mount("#app");
